package com.gitee.xmhzzz.component.common.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import org.hibernate.validator.constraints.Range;

import java.io.Serializable;

/**
  * @ClassName
  * @Description
  * @Author wzq
  * @Date 2023/12/15 16:42
  * @Version 1.0
  */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder(toBuilder = true)
public class PageBase extends BaseInfo implements Serializable  {

    private static final long serialVersionUID = 1L;

    @Range(min = 1)
    @ApiModelProperty("当前页（从1开始）")
    private Integer current;

    @Range(min = 1, max = 300)
    @ApiModelProperty("分页大小（默认10）")
    private Integer size;

    @ApiModelProperty(value = "是否自动分页，分页插件参数",hidden = true)
    private boolean auto = true;

    @ApiModelProperty(value = "是否查询总页数，分页插件参数",hidden = true)
    private boolean count = true;
}
